3.3 \(\int (d+e x)^2 (a+b \tanh ^{-1}(c x)) \, dx\)

Optimal. Leaf size=96 \[ \frac{(d+e x)^3 \left (a+b \tanh ^{-1}(c x)\right )}{3 e}-\frac{b (c d-e)^3 \log (c x+1)}{6 c^3 e}+\frac{b (c d+e)^3 \log (1-c x)}{6 c^3 e}+\frac{b d e x}{c}+\frac{b e^2 x^2}{6 c} \]

[Out]

(b*d*e*x)/c + (b*e^2*x^2)/(6*c) + ((d + e*x)^3*(a + b*ArcTanh[c*x]))/(3*e) + (b*(c*d + e)^3*Log[1 - c*x])/(6*c
^3*e) - (b*(c*d - e)^3*Log[1 + c*x])/(6*c^3*e)

________________________________________________________________________________________

Rubi [A]  time = 0.121853, antiderivative size = 96, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {5926, 702, 633, 31} \[ \frac{(d+e x)^3 \left (a+b \tanh ^{-1}(c x)\right )}{3 e}-\frac{b (c d-e)^3 \log (c x+1)}{6 c^3 e}+\frac{b (c d+e)^3 \log (1-c x)}{6 c^3 e}+\frac{b d e x}{c}+\frac{b e^2 x^2}{6 c} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x)^2*(a + b*ArcTanh[c*x]),x]

[Out]

(b*d*e*x)/c + (b*e^2*x^2)/(6*c) + ((d + e*x)^3*(a + b*ArcTanh[c*x]))/(3*e) + (b*(c*d + e)^3*Log[1 - c*x])/(6*c
^3*e) - (b*(c*d - e)^3*Log[1 + c*x])/(6*c^3*e)

Rule 5926

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1)*(a + b
*ArcTanh[c*x]))/(e*(q + 1)), x] - Dist[(b*c)/(e*(q + 1)), Int[(d + e*x)^(q + 1)/(1 - c^2*x^2), x], x] /; FreeQ
[{a, b, c, d, e, q}, x] && NeQ[q, -1]

Rule 702

Int[((d_) + (e_.)*(x_))^(m_)/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[(d + e*x)^m, a + c*x^2,
x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[m, 1] && (NeQ[d, 0] || GtQ[m, 2])

Rule 633

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[-(a*c), 2]}, Dist[e/2 + (c*d)/(2*q),
Int[1/(-q + c*x), x], x] + Dist[e/2 - (c*d)/(2*q), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[-(a*c)]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int (d+e x)^2 \left (a+b \tanh ^{-1}(c x)\right ) \, dx &=\frac{(d+e x)^3 \left (a+b \tanh ^{-1}(c x)\right )}{3 e}-\frac{(b c) \int \frac{(d+e x)^3}{1-c^2 x^2} \, dx}{3 e}\\ &=\frac{(d+e x)^3 \left (a+b \tanh ^{-1}(c x)\right )}{3 e}-\frac{(b c) \int \left (-\frac{3 d e^2}{c^2}-\frac{e^3 x}{c^2}+\frac{c^2 d^3+3 d e^2+e \left (3 c^2 d^2+e^2\right ) x}{c^2 \left (1-c^2 x^2\right )}\right ) \, dx}{3 e}\\ &=\frac{b d e x}{c}+\frac{b e^2 x^2}{6 c}+\frac{(d+e x)^3 \left (a+b \tanh ^{-1}(c x)\right )}{3 e}-\frac{b \int \frac{c^2 d^3+3 d e^2+e \left (3 c^2 d^2+e^2\right ) x}{1-c^2 x^2} \, dx}{3 c e}\\ &=\frac{b d e x}{c}+\frac{b e^2 x^2}{6 c}+\frac{(d+e x)^3 \left (a+b \tanh ^{-1}(c x)\right )}{3 e}+\frac{\left (b (c d-e)^3\right ) \int \frac{1}{-c-c^2 x} \, dx}{6 c e}-\frac{\left (b (c d+e)^3\right ) \int \frac{1}{c-c^2 x} \, dx}{6 c e}\\ &=\frac{b d e x}{c}+\frac{b e^2 x^2}{6 c}+\frac{(d+e x)^3 \left (a+b \tanh ^{-1}(c x)\right )}{3 e}+\frac{b (c d+e)^3 \log (1-c x)}{6 c^3 e}-\frac{b (c d-e)^3 \log (1+c x)}{6 c^3 e}\\ \end{align*}

Mathematica [A]  time = 0.0953217, size = 129, normalized size = 1.34 \[ \frac{1}{6} \left (\frac{e x^2 (6 a c d+b e)}{c}+\frac{6 d x (a c d+b e)}{c}+2 a e^2 x^3+\frac{b \left (3 c^2 d^2+3 c d e+e^2\right ) \log (1-c x)}{c^3}+\frac{b \left (3 c^2 d^2-3 c d e+e^2\right ) \log (c x+1)}{c^3}+2 b x \tanh ^{-1}(c x) \left (3 d^2+3 d e x+e^2 x^2\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)^2*(a + b*ArcTanh[c*x]),x]

[Out]

((6*d*(a*c*d + b*e)*x)/c + (e*(6*a*c*d + b*e)*x^2)/c + 2*a*e^2*x^3 + 2*b*x*(3*d^2 + 3*d*e*x + e^2*x^2)*ArcTanh
[c*x] + (b*(3*c^2*d^2 + 3*c*d*e + e^2)*Log[1 - c*x])/c^3 + (b*(3*c^2*d^2 - 3*c*d*e + e^2)*Log[1 + c*x])/c^3)/6

________________________________________________________________________________________

Maple [B]  time = 0.029, size = 218, normalized size = 2.3 \begin{align*}{\frac{a{x}^{3}{e}^{2}}{3}}+a{x}^{2}de+ax{d}^{2}+{\frac{a{d}^{3}}{3\,e}}+{\frac{b{e}^{2}{\it Artanh} \left ( cx \right ){x}^{3}}{3}}+be{\it Artanh} \left ( cx \right ){x}^{2}d+b{\it Artanh} \left ( cx \right ) x{d}^{2}+{\frac{b{\it Artanh} \left ( cx \right ){d}^{3}}{3\,e}}+{\frac{b{e}^{2}{x}^{2}}{6\,c}}+{\frac{bdex}{c}}+{\frac{b\ln \left ( cx-1 \right ){d}^{3}}{6\,e}}+{\frac{b\ln \left ( cx-1 \right ){d}^{2}}{2\,c}}+{\frac{be\ln \left ( cx-1 \right ) d}{2\,{c}^{2}}}+{\frac{b{e}^{2}\ln \left ( cx-1 \right ) }{6\,{c}^{3}}}-{\frac{b\ln \left ( cx+1 \right ){d}^{3}}{6\,e}}+{\frac{b\ln \left ( cx+1 \right ){d}^{2}}{2\,c}}-{\frac{be\ln \left ( cx+1 \right ) d}{2\,{c}^{2}}}+{\frac{b{e}^{2}\ln \left ( cx+1 \right ) }{6\,{c}^{3}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*(a+b*arctanh(c*x)),x)

[Out]

1/3*a*x^3*e^2+a*x^2*d*e+a*x*d^2+1/3*a/e*d^3+1/3*b*e^2*arctanh(c*x)*x^3+b*e*arctanh(c*x)*x^2*d+b*arctanh(c*x)*x
*d^2+1/3*b/e*arctanh(c*x)*d^3+1/6*b*e^2*x^2/c+b*d*e*x/c+1/6*b/e*ln(c*x-1)*d^3+1/2/c*b*ln(c*x-1)*d^2+1/2/c^2*b*
e*ln(c*x-1)*d+1/6/c^3*b*e^2*ln(c*x-1)-1/6*b/e*ln(c*x+1)*d^3+1/2/c*b*ln(c*x+1)*d^2-1/2/c^2*b*e*ln(c*x+1)*d+1/6/
c^3*b*e^2*ln(c*x+1)

________________________________________________________________________________________

Maxima [A]  time = 0.989791, size = 185, normalized size = 1.93 \begin{align*} \frac{1}{3} \, a e^{2} x^{3} + a d e x^{2} + \frac{1}{2} \,{\left (2 \, x^{2} \operatorname{artanh}\left (c x\right ) + c{\left (\frac{2 \, x}{c^{2}} - \frac{\log \left (c x + 1\right )}{c^{3}} + \frac{\log \left (c x - 1\right )}{c^{3}}\right )}\right )} b d e + \frac{1}{6} \,{\left (2 \, x^{3} \operatorname{artanh}\left (c x\right ) + c{\left (\frac{x^{2}}{c^{2}} + \frac{\log \left (c^{2} x^{2} - 1\right )}{c^{4}}\right )}\right )} b e^{2} + a d^{2} x + \frac{{\left (2 \, c x \operatorname{artanh}\left (c x\right ) + \log \left (-c^{2} x^{2} + 1\right )\right )} b d^{2}}{2 \, c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*arctanh(c*x)),x, algorithm="maxima")

[Out]

1/3*a*e^2*x^3 + a*d*e*x^2 + 1/2*(2*x^2*arctanh(c*x) + c*(2*x/c^2 - log(c*x + 1)/c^3 + log(c*x - 1)/c^3))*b*d*e
 + 1/6*(2*x^3*arctanh(c*x) + c*(x^2/c^2 + log(c^2*x^2 - 1)/c^4))*b*e^2 + a*d^2*x + 1/2*(2*c*x*arctanh(c*x) + l
og(-c^2*x^2 + 1))*b*d^2/c

________________________________________________________________________________________

Fricas [A]  time = 1.66562, size = 358, normalized size = 3.73 \begin{align*} \frac{2 \, a c^{3} e^{2} x^{3} +{\left (6 \, a c^{3} d e + b c^{2} e^{2}\right )} x^{2} + 6 \,{\left (a c^{3} d^{2} + b c^{2} d e\right )} x +{\left (3 \, b c^{2} d^{2} - 3 \, b c d e + b e^{2}\right )} \log \left (c x + 1\right ) +{\left (3 \, b c^{2} d^{2} + 3 \, b c d e + b e^{2}\right )} \log \left (c x - 1\right ) +{\left (b c^{3} e^{2} x^{3} + 3 \, b c^{3} d e x^{2} + 3 \, b c^{3} d^{2} x\right )} \log \left (-\frac{c x + 1}{c x - 1}\right )}{6 \, c^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*arctanh(c*x)),x, algorithm="fricas")

[Out]

1/6*(2*a*c^3*e^2*x^3 + (6*a*c^3*d*e + b*c^2*e^2)*x^2 + 6*(a*c^3*d^2 + b*c^2*d*e)*x + (3*b*c^2*d^2 - 3*b*c*d*e
+ b*e^2)*log(c*x + 1) + (3*b*c^2*d^2 + 3*b*c*d*e + b*e^2)*log(c*x - 1) + (b*c^3*e^2*x^3 + 3*b*c^3*d*e*x^2 + 3*
b*c^3*d^2*x)*log(-(c*x + 1)/(c*x - 1)))/c^3

________________________________________________________________________________________

Sympy [A]  time = 2.03709, size = 178, normalized size = 1.85 \begin{align*} \begin{cases} a d^{2} x + a d e x^{2} + \frac{a e^{2} x^{3}}{3} + b d^{2} x \operatorname{atanh}{\left (c x \right )} + b d e x^{2} \operatorname{atanh}{\left (c x \right )} + \frac{b e^{2} x^{3} \operatorname{atanh}{\left (c x \right )}}{3} + \frac{b d^{2} \log{\left (x - \frac{1}{c} \right )}}{c} + \frac{b d^{2} \operatorname{atanh}{\left (c x \right )}}{c} + \frac{b d e x}{c} + \frac{b e^{2} x^{2}}{6 c} - \frac{b d e \operatorname{atanh}{\left (c x \right )}}{c^{2}} + \frac{b e^{2} \log{\left (x - \frac{1}{c} \right )}}{3 c^{3}} + \frac{b e^{2} \operatorname{atanh}{\left (c x \right )}}{3 c^{3}} & \text{for}\: c \neq 0 \\a \left (d^{2} x + d e x^{2} + \frac{e^{2} x^{3}}{3}\right ) & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*(a+b*atanh(c*x)),x)

[Out]

Piecewise((a*d**2*x + a*d*e*x**2 + a*e**2*x**3/3 + b*d**2*x*atanh(c*x) + b*d*e*x**2*atanh(c*x) + b*e**2*x**3*a
tanh(c*x)/3 + b*d**2*log(x - 1/c)/c + b*d**2*atanh(c*x)/c + b*d*e*x/c + b*e**2*x**2/(6*c) - b*d*e*atanh(c*x)/c
**2 + b*e**2*log(x - 1/c)/(3*c**3) + b*e**2*atanh(c*x)/(3*c**3), Ne(c, 0)), (a*(d**2*x + d*e*x**2 + e**2*x**3/
3), True))

________________________________________________________________________________________

Giac [B]  time = 1.15238, size = 263, normalized size = 2.74 \begin{align*} \frac{b c^{3} x^{3} e^{2} \log \left (-\frac{c x + 1}{c x - 1}\right ) + 3 \, b c^{3} d x^{2} e \log \left (-\frac{c x + 1}{c x - 1}\right ) + 2 \, a c^{3} x^{3} e^{2} + 6 \, a c^{3} d x^{2} e + 3 \, b c^{3} d^{2} x \log \left (-\frac{c x + 1}{c x - 1}\right ) + 6 \, a c^{3} d^{2} x + b c^{2} x^{2} e^{2} + 6 \, b c^{2} d x e + 3 \, b c^{2} d^{2} \log \left (c^{2} x^{2} - 1\right ) - 3 \, b c d e \log \left (c x + 1\right ) + 3 \, b c d e \log \left (c x - 1\right ) + b e^{2} \log \left (c^{2} x^{2} - 1\right )}{6 \, c^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*arctanh(c*x)),x, algorithm="giac")

[Out]

1/6*(b*c^3*x^3*e^2*log(-(c*x + 1)/(c*x - 1)) + 3*b*c^3*d*x^2*e*log(-(c*x + 1)/(c*x - 1)) + 2*a*c^3*x^3*e^2 + 6
*a*c^3*d*x^2*e + 3*b*c^3*d^2*x*log(-(c*x + 1)/(c*x - 1)) + 6*a*c^3*d^2*x + b*c^2*x^2*e^2 + 6*b*c^2*d*x*e + 3*b
*c^2*d^2*log(c^2*x^2 - 1) - 3*b*c*d*e*log(c*x + 1) + 3*b*c*d*e*log(c*x - 1) + b*e^2*log(c^2*x^2 - 1))/c^3